package com.atguigu.gulimall.product.feign.fallback;

import com.atguigu.common.exception.BizeCodeEnum;
import com.atguigu.common.utils.R;
import com.atguigu.gulimall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class SeckillFeignServiceFallBack implements SeckillFeignService {
    @Override
    public R getSkuSeckillInfo(Long skuId) {
        log.info("熔断方法调用getSkuSeckillInfo"+skuId);
        return R.error(BizeCodeEnum.TOO_MANY_REQUEST.getCode(), BizeCodeEnum.TOO_MANY_REQUEST.getMessage());
    }
}
